package com.fuda.trade

import com.fuda.trade.model.TradeOrder
import com.fuda.trade.model.TradeOrderData


class Party3AppManager(private val party3AppHandler: Party3AppHandler) {

    companion object {
        val TAG: String = Party3AppManager::class.java.simpleName
    }

    fun handleOrder(service: TradeAccessibilityService, tradeOrder: TradeOrder): Boolean{
        val result = party3AppHandler.handleOrder(service,tradeOrder)
        return result
    }

    fun refreshActiveForeground(service: TradeAccessibilityService):Boolean{
        val result = party3AppHandler.refreshActiveForeground(service)
        return result
    }

    fun isAppActive(service: TradeAccessibilityService): Boolean {
        val result = party3AppHandler.isAppActive(service)
        return result
    }

    interface Party3AppHandler {
        fun handleOrder(service: TradeAccessibilityService, tradeOrder: TradeOrder): Boolean
        fun refreshActiveForeground(service: TradeAccessibilityService):Boolean
        fun isAppActive(service: TradeAccessibilityService):Boolean
    }
}